package hehe.web;

import hehe.core.base.Response;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Response 类
 *<B>说明：</B>
 *<pre>
 * 略
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */
public class WebResponse extends Response
{
    protected HttpServletResponse resp;

    public WebResponse(HttpServletResponse resp)
    {
        this.resp = resp;
    }

    /**
     * 向客户端输出内容
     *<B>说明：</B>
     *<pre>
     *  略
     *</pre>
     */
    public void send()
    {
        try {
            this.resp.getWriter().write(this.content);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
